#ifndef SETUPWINDOW_H
#define SETUPWINDOW_H

#include <QtGui/QMainWindow>
#include <QLabel>
#include <QLineEdit>
#include <QComboBox>
#include <cstdlib>
#include <vector>
#include "Player.h"

using namespace std;

namespace Ui
{
    class SetupWindowClass;
}

class SetupWindow : public QMainWindow
{
    Q_OBJECT
    Q_DISABLE_COPY(SetupWindow)
public:
    explicit SetupWindow(QWidget *parent = 0);
    virtual ~SetupWindow();
    vector<Player*> getPlayers() const {return m_players;}

protected:
    virtual void changeEvent(QEvent *e);

signals:
    void playersCreated(vector<Player*> players);

private slots:
    void selectNumPlayers(int value);
    void handleButtonClick();

private:
    Ui::SetupWindowClass *m_ui;
    vector<QLabel*> m_playLabels;
    vector<QLineEdit*> m_playNames;
    vector<QComboBox*> m_playColors;
    vector<Player*> m_players;
    int m_numPlayers;

    bool checkPlaySetup();
    void startGame();
};

#endif // SETUPWINDOW_H
